<template>
    <div>
        <zi :aaa="aaa" @add="add"></zi>
        <h2>{{hhh}}</h2>
    </div>
</template>

<script>
import zi from '../components/zi.vue'
    export default {
        components:{
            zi
        },
        data() {
            return {
                aaa:'父传子',
                hhh:''
            }
        },
        methods: {
            add(val){
                console.log(val);
                this.hhh=val
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>